package com.ryl.yomall.weball;

import com.ryl.yomall.model.common.interceptor.FeignInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

/**
 * @Date 13:48
 * @Author ryl
 */
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@ComponentScan({"com.ryl.yomall"})
@EnableDiscoveryClient
@EnableFeignClients(basePackages= {"com.ryl.yomall"})
public class WebAllApplication {
    public static void main(String[] args) {

        SpringApplication.run ( WebAllApplication.class,args );
    }
    //引入远程调用的拦截器
    @Bean
    public FeignInterceptor feignInterceptor(){
        return new FeignInterceptor ();
    }
}
